package grpc_module

import (
	"context"
	"gitee.com/kmyss/gf-ex/yscmd"
)

type FlagWatchBuilder struct {
	yscmd.FlagBuilderCore
}

func (b *FlagWatchBuilder) Init(ctx context.Context, group ...string) {
	b.FlagBuilderCore.Init(ctx, group...)
	b.F.Short = ""
	b.F.Long = "watch"
	b.F.Description = `
        启动 MQ 监听模块，会将收集到的所有 topic 记录到界面中。
        后面可以增加需要监听的 topic 信息用逗分隔
        --watch='json.search.,json.raw'`
	b.F.DefaultValue = ""
}

func FlagWatch(ctx context.Context, group ...string) *yscmd.Flag {
	build := &FlagWatchBuilder{}
	build.Init(ctx, group...)
	return build.Flag()
}
